package edu.scau.misp.backend_module.service.impl;

import edu.scau.misp.backend_module.domain.Order;
import edu.scau.misp.backend_module.domain.OrderDeal;
import edu.scau.misp.backend_module.mapper.OrderDealMapper;
import edu.scau.misp.backend_module.mapper.OrderMapper;
import edu.scau.misp.backend_module.service.OrderDealService;
import edu.scau.misp.backend_module.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDealServiceImpl implements OrderDealService {

    @Autowired
    OrderDealMapper orderDealMapper;

    @Override
    public List<OrderDeal> getOrderDealById(Long orderId) {
        return orderDealMapper.getOrderDealById(orderId);
    }

    @Override
    public List<OrderDeal> listAllOrderDeal() {
        return orderDealMapper.listAllOrderDeal();
    }

    @Override
    public List<OrderDeal> selectOrderDealList(OrderDeal orderDeal) {
        return null;
    }

    @Override
    public int insertOrderDeal(OrderDeal orderDeal) {
        return orderDealMapper.insertOrderDeal(orderDeal);
    }

    @Override
    public int updateOrderDeal(OrderDeal orderDeal) {
        return 0;
    }

    @Override
    public int deleteOrderDealById(Long orderId) {
        return orderDealMapper.deleteOrderDealById(orderId);
    }
}
